package com.game.league.mine.detail.adapter;

import com.game.base.app.base.BaseAdapter;
import com.game.league.R;
import com.game.league.databinding.AdapterFlowBillBinding;
import com.game.league.mine.table.FlowBill;

/**
 * Created by Su on 2019/6/13.
 */
public class FlowBillAdapter extends BaseAdapter<FlowBill, AdapterFlowBillBinding> {
    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.adapter_flow_bill;
    }

    @Override
    protected void onBindItem(AdapterFlowBillBinding binding, FlowBill item, int position) {
        binding.tvAppName.setText(item.getTitle());
        binding.tvCreateTime.setText(item.getCreatedAt());
        binding.tvCurrentRemain.setText("当前余额：" + item.getCurrentCoin());
        binding.tvCoin.setText((item.isAdd() ? "+ " : "- ") + item.getPrice());
    }
}
